home *** CD-ROM | disk | FTP | other *** search
/ Network Support Library / RoseWare - Network Support Library.iso / apidev / tpapi.exe / DOCS / OVERVIEW.DOC < prev    next >
Text File  |  1994-01-14  |  8KB  |  200 lines

  1.               *************************************************
  2.               * Turbo Pascal API's for Novell Netware (TPAPI) *
  3.               *************************************************
  4.  
  5.       TPAPI (c) Copyr. 1991 - 1994 Antonio Covelli ALL RIGHTS RESERVED
  6.  
  7.  
  8. OVERVIEW
  9. --------
  10.  
  11. TPAPI (pronounced Tee-Pap-E) is an object oriented library of Netware API's
  12. written in Borland's PASCAL language. Novell has always shunned the installed
  13. base of PASCAL engineers when providing their SDK's and TPAPI is designed to
  14. address this shortsight. With TPAPI there is no need to "shell out" to do tasks
  15. such as logging in or out, spooling to a print queue, mapping drives or
  16. obtaining specific Netware information.
  17.  
  18. Currently TPAPI consists of over 21,000 lines of PASCAL and built-in assembler.
  19. Due to the use of BASM TPAPI requires Turbo Pascal 6.x or later. Further
  20. information detailing the necessary requirements can be found in the section
  21. titled TPAPI REQUIREMENTS.
  22.  
  23. Support is provided for Novell Netware v2.x, Netware v3.x and Netware v4.x.
  24. Many of the new v3.x and v4.x API's have not been implemented but will be done
  25. at a later stage.  IPX/SPX support is also to be implemented.
  26.  
  27. With the advent of Netware v4.x Novell released new client shells called the
  28. Virtual Loadable Module client (VLM). This client shell is quite different from
  29. the older NETX shell in two ways :
  30.  
  31.     1) It is actually a requester. DOS decides whether the called API is for
  32.        DOS or the Netware requester.
  33.     2) When executing API's you call the requester directly and not by executing
  34.        INT 21h as in NETX.
  35.  
  36. TPAPI is being changed to support the VLM client and can automatically detect
  37. whether the VLM or NETX client is in use and act accordingly. Novell has stated
  38. that virtually all research and development is being carried out on making the
  39. VLM client successful. This basically means that the NETX client, like the
  40. IPX.OBJ, is a dying breed.
  41.  
  42. Novell has also started publish to the NCP (Netware Core Protocol) transport
  43. mechanism for all their API's. NCP allows "raw" packets to be sent to a file
  44. server. When a file server receives an NCP packet it will attempt to interpret
  45. the contents and act in one of the following ways :
  46.  
  47.     1) if the packet is invalid issue an Invalid Packet error.
  48.     2) if the packet is correct but contains incorrect parameters ABEND.
  49.     3) execute the request and send either/or return packets or result codes.
  50.  
  51. Many of the NCP equivalent API's have been incorporated into TPAPI but Novell
  52. has not published all the information as of yet. The major benefit of using NCP
  53. is that the request/receive packet structures are identical regardless of what
  54. client software is running.
  55.  
  56.  
  57. DESIGN OF TPAPI
  58. ---------------
  59.  
  60. TPAPI is an Object Oriented (OOP) library which enables anyone to extend the
  61. library and tailor it for their own needs. One thing that you must not do is
  62. to directly manipulate any of the internal variables but use the methods
  63. provided.
  64.  
  65. When adding your own methods to the library please follow theses guidelines :
  66.  
  67. function MyObj.ChangePW (ObjectName : TObjectName;
  68.                          ObjectType : OT_BinderyType;
  69.                          OldPW, NewPW : TPassword) : word;
  70.  
  71. begin
  72.  
  73.   InitStandardBuffers;
  74.   {The above method initialises the request/reply buffers and will reallocate
  75.    them if DynamicAllocation is true. It also sets the buffer offset to 2.}
  76.  
  77.   ObjectName := UppercaseNW (ObjectName);
  78.   OldPW := UppercaseNW (OldPW);
  79.   NewPW := UppercaseNW (NewPW);
  80.   {When dealing with the bindery Netware likes all strings to be in uppercase}
  81.  
  82.   AddByte (64);
  83.   {Add the subfunction code at offset 2. Addbyte thens increments the offset
  84.    by 1.}
  85.   
  86.   AddWordSwap (ObjectType);
  87.   {Add the ObjectType swapped and increment the offset by 2.}
  88.  
  89.   AddString (ObjectName, 0);
  90.   {Add the string contained in ObjectName, starting at pos 0 of the string, and
  91.    increment offset by length of ObjectName.}
  92.  
  93.   AddString (OldPassword, 0);
  94.   AddString (NewPassword, 0);
  95.   {See the comment for AddString (ObjectName, 0).}
  96.  
  97.   AddTotal (Request, True);
  98.   {Add the total length of the request buffer into position 0. Due to this
  99.    being an NCP call the length needs to be swapped. If this call was not an
  100.    NCP call then pass false.}
  101.  
  102.   SetTotal (Receive, 0);
  103.   {Sets the total of the receive buffer expected back. The second parameter is
  104.    the size of the buffer to be returned.}
  105.  
  106.   ChangePW := NCPRequest ($17, GetTotal (Request), nwRequestBuffer.RealPtr,
  107.                           GetTotal (Receive), nwReceiveBuffer.RealPtr);
  108.   {Calls the function NCPRequest which prepares the buffers for passing to the
  109.    Netware shell. The first parameter is the main function code, the second is
  110.    the size of the request buffer, the third the actual request buffer pointer,
  111.    followed by the size of the receive buffer and its pointer.}
  112.  
  113. end; {MyOBJ.ChangePW}
  114.  
  115.  
  116. TPAPI REQUIREMENTS
  117. ------------------
  118.  
  119. TPAPI requires one or more of the following PASCAL compilers
  120.  
  121.  
  122.  
  123.   TARGET PLATFORM            COMPILER NEEDED
  124.  
  125.  
  126.   DOS (Real Mode)            Turbo Pascal 6.x
  127.                              Turbo Pascal 7.x
  128.                              Borland Pascal 7.x
  129.  
  130.   DOS (Protected Mode)       Borland Pascal 7.x
  131.  
  132.   WINDOWS                    Borland Pascal 7.x
  133.                              Turbo Pascal for Windows v1.x
  134.  
  135. In addition (for testing purposes) you should have the client software installed
  136. and connected to a file server running a copy of Netware.
  137.  
  138. TPAPI HAS NOT BEEN TESTED WITH OTHER MANUFACTURERS PASCAL COMPILERS AND CANNOT
  139. BE GUARANTEED TO FUNCTION OR COMPILE CORRECTLY.
  140.  
  141.  
  142.  
  143.  
  144. CONTACTING THE AUTHOR
  145. ---------------------
  146.  
  147. I can be contacted in a number of ways for technical support or just plain
  148. chat.
  149.  
  150. The easiest method is via email :
  151.  
  152.     CIS            100015,3611
  153.     CIX            tcovelli
  154.     Internet       100015.3611@compuserve.com
  155.  
  156. or via postal mail at
  157.  
  158.    104 Brookfield Road,
  159.    Aldershot,
  160.    Hampshire.
  161.    GU12 4UT
  162.    United Kingdom
  163.  
  164.  
  165. ABOUT THE AUTHOR
  166. ----------------
  167.  
  168. I originally became involved in Novell Netware in 1987 when I was thrown in at 
  169. the deep end by the Company I was working for. The LAN consisted of 
  170. approximately 15 file servers (which consisted of Novell 286b, Televideo PM16
  171. and Televideo PM286) running Televideo Netware and Netware 286 v2.0a.
  172.  
  173. Soon the network grew and the machines were replaced with Compaq Deskpro 386/25
  174. with 16mb RAM and 4x300 ESDI drives. After a while the LAN peaked to 30 file
  175. servers with 600 concurrent users (running a mortgage book of over 3.5b pounds).
  176.  
  177. The site was based in Fleet within two buildings which were linked by a fibre
  178. link, running over thin ethernet. As you can imagine running a network of that
  179. size took a considerable amount of time so TPAPI was developed. 
  180.  
  181. In 1992 I left and joined a large insurance company based near London and am
  182. the Senior PC/LAN analyst. The network is slowly growing and will become one
  183. of the most advanced in Britain in time.
  184.  
  185. I spend a great deal of time relaxing by listening to music, trying to succeed
  186. in RPG games (on the computer) and playing with my son (who is rapidly showing
  187. an interest in computers although he is only 2.5 years old).
  188.  
  189.  
  190. TRADEMARKS AND COPYRIGHTS
  191. -------------------------
  192.  
  193.   TPAPI is a trademark of Antonio Covelli. ALL RIGHTS RESERVED.
  194.  
  195.   Turbo/Borland Pascal is a registered trademark of Borland International.
  196.  
  197.   Netware is a registered trademark of Novell, Inc.
  198.  
  199.   LHA is copyright Yoshi.
  200.